﻿
set(JSON_BuildTests OFF CACHE INTERNAL "")

include(FetchContent)

FetchContent_Declare(
    json
    DOWNLOAD_EXTRACT_TIMESTAMP YES
    URL ${PROJECT_SOURCE_DIR}/third_package/json.tar.xz
    URL_HASH MD5=127794b2c82c0c5693805feaa2a703e2
)
FetchContent_MakeAvailable(json)

add_executable(autoload autoload.cpp cfg_merge.cpp)

target_link_libraries(autoload PRIVATE nlohmann_json::nlohmann_json)

INSTALL(TARGETS autoload
    RUNTIME DESTINATION dev_helper
)

install(FILES conf.json DESTINATION dev_helper)

INSTALL(DIRECTORY img DESTINATION dev_helper)
